Lab
-
Locate the code for chaper 1 on the HeadFirst JavaScript
website.
- Download the two iRock images into a new folder in the Labs directory on your thumb-drive.
-
Create the iRock HTML page (see page 17 of the text).
-
Add a JavaScript alert to make the rock greet users when the web page loads (page 20).
-
Write JavaScript code to
- ask the user's name,
- display a personalized greeting, and
- make the rock smile
(page 24).
-
Add an event handler to run this code
when the user clicks on the rock (page 26).
- (If you haven't already), transfer the folder for today's lab to your thumb drive.
-
Create a hyperlink from your labs directory's index.html
to the web pages you worked on today.
- Using an FTP client, synchronize your web site to the image on your thumbdrive.
Always shut down your computer and turn off your display before leaving the lab.